
def newHello(function):
    def wrapper():
        print('hello')
        return function()
    return wrapper

@newHello
def helllo():
    print("hello world")

def repeat(num_times):
    print('num_times', num_times)
    def decorator(func):
        print('func', func)
        def wrapper(*args, **kwargs):
            print('*args', *args, '**kwargs', kwargs)
            for _ in range(num_times):
                func(*args, **kwargs)
        return wrapper
    return decorator

@repeat(3)
def say_hello(val):
    print("Hello!")

class student:
    def __init__(self, name, age):
        self.name = name
        self.age = age

say_hello(student('John', 25))
name = "Alice"
print(f"{name:>10}")  # 右对齐，宽度10: '     Alice'
print(f"{name:<10}")  # 左对齐，宽度10: 'Alice     '
print(f"{name:^10}")  # 居中对齐，宽度10: '  Alice   '
print(f"{name:_<10}") # 左对齐并用_填充: 'Alice_____'